{extend name="layout"}
{block name="body"}
    <section class="wld-content">
        <div class="page_title">增员信息表</div>
        
        <div class="con_box layui-form">
            <div class="topTips">反馈信息：{$increase_insurance.feedback|default=""}</div>
            <form class="layui-form-type layui-form mainForm" data-auto="true" data-callback="submitCallback">
                <div class="con_title">
                    <span class="con_title_line"></span>
                    <span>员工信息</span>
                </div>
                <div class="add-input layui-form-item">
                	
                    <div class="layui-row ">
                    	<div class="layui-col-md4">
                            <div class="layui-inline ">
                                <label class="layui-form-label label-required-prev">服务编号</label>
                                <div class="layui-input-inline seller-inline-input">
                                    <input type="text"   disabled autocomplete="off"
                                           value="{$increase.code|default=""}"
                                    class="layui-input ">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-inline ">
                                <label class="layui-form-label label-required-prev">姓&ensp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</label>
                                <div class="layui-input-inline seller-inline-input">
                                    <input type="text"   disabled autocomplete="off" value="{$increase.name|default=""}" class="layui-input ">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-inline ">
                                <label class="layui-form-label label-required-prev">身份证号</label>
                                <div class="layui-input-inline seller-inline-input">
                                    <input type="text"    disabled autocomplete="off"
                                           value="{$increase.id_number|default=""}"
                                    class="layui-input ">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-inline ">
                                <label class="layui-form-label label-required-prev">手机号码</label>
                                <div class="layui-input-inline seller-inline-input">
                                    <input type="text"  disabled autocomplete="off"
                                           value="{$increase.mobile|default=""}"
                                    class="layui-input ">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-inline ">
                                <label class="layui-form-label label-required-prev">托管档案</label>
                                <div class="layui-input-inline seller-inline-input">
                                    <input type="text"  disabled autocomplete="off"
                                           {if $increase.archives eq 1}value="是"{else/}value="否"{/if}
                                    class="layui-input ">
                                </div>
                            </div>
                        </div>
                        
                    </div>
                </div>
                <div class="con_title">
                    <span class="con_title_line"></span>
                    <span>确认信息</span>
                </div>
                <div class="add-input layui-form-item">
                    <div class="layui-row ">
                    	<div class="layui-col-md4">
                            <div class="layui-inline ">
                                <label class="layui-form-label label-required-prev">保险类型</label>
                                <div class="layui-input-inline seller-inline-input">
                                    <input type="text"  disabled autocomplete="off"
                                           value="{$insurances[$increase_insurance.insurance]}"
                                    class="layui-input ">
                                </div>
                            </div>
                        </div>
                       
                        <div class="layui-col-md4">
                            <div class="layui-inline layui-form-item ">
                                <label class="layui-form-label label-required-prev">月发工资</label>
                                <div class="layui-input-inline  seller-inline-input input-icon">
									<i class="iconfont iconcontract2-fill"></i>    
                                    <input type="text" name="wage" value="{$increase_insurance.wage|default=""}" required
                                    placeholder="请输入月发工资" 
                                    class="layui-input" autocomplete="off">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-inline layui-form-item ">
                                <label class="layui-form-label label-required-prev">单位基数</label>
                                <div class="layui-input-inline  seller-inline-input input-icon">
									<i class="iconfont iconcontract2-fill"></i>    
                                    <input type="text" name="company_base" value="{$increase_insurance.company_base|default="0.00"}" required
                                    placeholder="请输入单位基数" 
                                    class="layui-input" autocomplete="off" readonly>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-inline layui-form-item ">
                                <label class="layui-form-label label-required-prev">个人基数</label>
                                <div class="layui-input-inline  seller-inline-input input-icon">
									<i class="iconfont iconcontract2-fill"></i>    
                                    <input type="text" name="personal_base" value="{$increase_insurance.personal_base|default="0.00"}" required
                                    placeholder="请输入个人基数" 
                                    class="layui-input" autocomplete="off" readonly>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-inline layui-form-item ">
                                <label class="layui-form-label label-required-prev">起始日期</label>
                                <div class="layui-input-inline  seller-inline-input input-icon">
									<i class="iconfont iconcontract2-fill"></i>    
                                    <input data-date-input="" name="start_date" value="{$increase_insurance.start_date|default=""}" required
                                    placeholder="请选择起始日期" 
                                    class="layui-input" autocomplete="off">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md4">
                            <div class="layui-inline layui-form-item ">
                                <label class="layui-form-label label-required-prev">所属账期</label>
                                <div class="layui-input-inline  seller-inline-input input-icon">
									<i class="iconfont iconcontract2-fill"></i>    
                                    <input data-date-input="month" name="account_period" value="{$increase_insurance.account_period ? $increase_insurance.account_period|default="" : $nextmonth}" required
                                    placeholder="请选择所属账期" 
                                    class="layui-input" autocomplete="off">
                                </div>
                            </div>
                        </div>
                  
                    </div>
                </div>
                <div class="add-obj">
                	<input type='hidden' value='{$increase_insurance.id}' name='id'>
                	<input type='hidden' value='{$increase_insurance.insurance}' name='insurance'>
                    <a class="add-back" onclick="window.history.back()">返回</a>
                    <a class="add-updata" onclick="$('form').submit()">提交</a>
                </div>
            </form>
			

		</div>
    </section>
{/block}
{block name="style"}
    <style>
        .layui-table tbody tr:hover{
            background-color: #fff;
        }
        .layui-table tbody tr td:nth-child(3) input{
            width: 648px;
        }
    </style>
{/block}
{block name="script"}
<script>
    $("[name='end_date']").change(function(){
        // $("[name^='insurance_end_date']").val($(this).val())

        var  val=$(this).val();
        $("[name^='insurance_end_date']").each(function(){
            var dataType=$(this).attr("data-type");
            $(this).val(val)
            
           
          
        })
        form.render();
    })
    $("[name='wage']").change(function(){
        let wage=$(this).val() ,insurance=$("[name='insurance']").val();
        console.log(wage,insurance)
        $.form.load('{:url("index/incconfig/insuranceBase")}', {wage,insurance}, "post", function (ret) {
                if (ret.code === 1) {
                    $("[name='company_base']").val(ret.data.company);
                    $("[name='personal_base']").val(ret.data.personal)
          
                } else {
                    $.msg.error(ret.info, 1)
                }
               

                 return false;
            })
    })
    
</script>

{/block}



